<div class="row">
    <?php echo $this->form; ?>
</div>

<div class="row" style="height:356px;">
    <div class="span16">
        <table id="sortTableExample" class="bordered-table zebra-striped">
            <thead>
                <tr>
                    <th class="header" style="width:4em;">Titre</th>
                    <th class="yellow header headerSortUp">Nom</th>
                    <th class="blue header">Prénom</th>
                    <th class="orange header">Adresse</th>
                    <th class="green header">Ville</th>
                    <th class="yellow header">Code postal</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($this->patient as $patient) : ?>

                    <tr style="background-color:<?php echo $this->cycle(array("#F0F0F0", "#FFFFFF"))->next(); ?>;cursor:pointer"
                        onclick="javascript:document.location='<?php echo $this->url(array('controller' => 'patient', 'action' => 'edit', 'id' => $patient->id_patient)); ?>'">
                        <td><?php echo $this->escape(ucfirst($patient->titre)); ?></td>
                        <td><strong><?php echo $this->escape($patient->nom); ?></strong></td>
                        <td><?php echo $this->escape($patient->prenom); ?></td>
                        <td><?php echo $this->escape($patient->adresse); ?></td>
                        <td><?php echo $this->escape($patient->ville); ?></td>
                        <td><?php echo $this->escape($patient->cpostal); ?></td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
        <?php echo $this->paginationControl($this->patient, 'Sliding', 'common/paginator.phtml'); ?>
    </div>
</div>

<script type="text/javascript">
    $(function() {
        $("table#sortTableExample").tablesorter({ sortList: [[1,0]] });
        // sorlist [[num_col, order)]]
        // 0 : asc, 1 : desc
    });
</script>



<!--<div class="row">
    <div class="span4" style="margin-bottom:18px">
        <input type="text" placeholder="Recherchez un patient" id="inputName" class="span4" />
        <div id="resultSearch" class="span4 div-search"></div>
    </div>
</div>
<script type="text/javascript">

    $("#inputName").keyup(function(){
        var searchName = $("#inputName").val();

        if(searchName != '')
        {
            $.ajax({ url:"<?php echo $this->baseUrl(); ?>/patient/ajax",data:{patient:searchName}, success:function(result){
                    $("#resultSearch").html(result);
                    $("#resultSearch").show(100);
                }});
        }
        else
        {
            $("#resultSearch").hide("slow");
        }
    });
</script>
-->